package com.itheima.多态.多态的好处和弊端;

public class Demo3 {
    public static void main(String[] args) {
        //先创建一个喂养员对象
        AnimalCY cy1=new AnimalCY();
        //指挥喂养员喂动物吃饭
        cy1.cyAnimal(new Cat());
        cy1.cyAnimal(new Dog());
    }
}
